<template>
	<view class="full box relative">
		<scroll-view class="full" scroll-y>
			<view class="content-text">
				<u-parse :content="content"></u-parse>
			</view>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				content: ""
			}
		},
		created() {
			this.initData()
		},
		methods: {
			async initData() {
				const resp = await this.$request({
					url: "/index/getAgreement",
				})
				const target = resp.data.find(item => item.id === 3)
				const {
					title,
					agreement
				} = target
				uni.setNavigationBarTitle({
					title
				})
				this.content = agreement
				console.log(target, 'resp');
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content-text {
		font-size: 28rpx;
		line-height: 1.5;
		padding: 16rpx 32rpx;
		box-sizing: border-box;
	}
</style>